/**
 * 
 */
package com.ssm.exception;

import org.apache.log4j.Logger;

/**
 * SSM 用户逻辑异常
 * @author 危文涛<245108903@qq.com>
 * @version 2016年2月11日 下午6:33:08
 *
 */
public class SsmException extends BaseException {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	protected final  Logger logger = Logger.getLogger(this.getClass());
	public SsmException(ExceptionCode code,Throwable cause)
	{
		super(code.toString(),cause);
		logger.info(message, what);
	}
	public SsmException(ExceptionCode code,Throwable cause,Integer timeSeconds,String redirectUrl)
	{
		super(code.toString(),cause);
		logger.info(message, what);
		setSecondsAndRedirect(timeSeconds,redirectUrl);
	}
	public SsmException(ExceptionCode code)
	{
		super(code.toString());
		logger.info(message);
	}
	public SsmException(ExceptionCode code,Integer timeSeconds,String redirectUrl)
	{
		super(code.toString());
		logger.info(message);
		setSecondsAndRedirect(timeSeconds,redirectUrl);
	}
	public SsmException(String msg,Throwable cause)
	{
		super(msg,cause);
		logger.info(message, what);
	}
	public SsmException(String msg,Throwable cause,Integer timeSeconds,String redirectUrl)
	{
		super(msg,cause);
		logger.info(message, what);
		setSecondsAndRedirect(timeSeconds,redirectUrl);
	}
	public SsmException(String msg)
	{
		super(msg);
		logger.info(message);
	}
	public SsmException(String msg,Integer timeSeconds,String redirectUrl)
	{
		super(msg);
		logger.info(message);
		setSecondsAndRedirect(timeSeconds,redirectUrl);
	}
	
	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return message;
	}
	

}
